home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0026-Re Object Pascal Qu-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-06  |  960 b   |  42 lines  |  [TEXT/GEOL]

  1. Item    3835962                         6-Oct-89        07:50
  2.  
  3. From:   KNEPPER                         Knepper, Christopher
  4.  
  5. To:     D0738                           Kane Biomedical System, S Helm,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    Re: Object Pascal Question
  10.  
  11. Jeffrey,
  12.  
  13. Are you aware that MacApp already provides a TList class? It handles all the
  14. needs of a list (there's also TSortedList if you need a sorted list). My guess
  15. is that you don't need to declare:
  16.  
  17.   TList = array [0..5] of TmyObj;
  18.  
  19. Instead you can use the built-in TList so that your class, TMyObj, should work
  20. as is, provided you allocate aList in IMyObj:
  21.  
  22. TYPE
  23.   TmyObj = OBJECT(TOBJECT)
  24.     PROCEDURE TMyObj.IMyObj; { !!! Note my addition of IMyObj !!! }
  25.     x,y: integer;
  26.     z: point
  27.     aList : TList;
  28.     function TmyObj.func1(x1,y1):integer;
  29.     end;
  30.  
  31. in which:
  32.  
  33. PROCEDURE TMyObj.IMyObj;
  34.   BEGIN
  35.   ...
  36.   aList := NewList;
  37.   ...
  38.   END;
  39.  
  40. -Chris
  41.  
  42.